package org.budo.aliyun.sdk;

import org.budo.aliyun.sdk.impl.response.DescribeScalingActivitiesResponse;
import org.budo.aliyun.sdk.impl.response.DescribeScalingInstancesResponse;
import org.budo.aliyun.sdk.impl.response.ExecuteScalingRuleResponse;
import org.budo.aliyun.sdk.impl.response.RemoveInstancesResponse;

/**
 * 弹性伸缩服务
 * 
 * @author lmw
 */
public interface BudoAliyunEssSdk {
    String ACTION_DESCRIBE_SCALING_INSTANCES = "DescribeScalingInstances";

    String ACTION_ATTACH_INSTANCES = "AttachInstances";

    /**
     * https://help.aliyun.com/document_detail/25955.html?spm=5176.doc25871.6.634.Yg0HFB
     */
    String ACTION_REMOVE_INSTANCES = "RemoveInstances";

    String ACTION_DESCRIBE_SCALING_ACTIVITIES = "DescribeScalingActivities";

    String ACTION_EXECUTE_SCALING_RULE = "ExecuteScalingRule";

    /**
     * 查询伸缩组内ECS实例列表
     * 
     * @see https://help.aliyun.com/document_detail/25942.html?spm=5176.product25855.6.621.fzxblI
     */
    DescribeScalingInstancesResponse describeScalingInstances(BudoAliyunRegion region, String scalingGroupId);

    /**
     * 从指定的伸缩组里移出ECS实例
     * 
     * @see https://help.aliyun.com/document_detail/25955.html?spm=a2c4g.11186623.6.632.tf7yUA
     * @param scalingGroupId
     * @param instanceId
     */
    RemoveInstancesResponse removeInstances(String scalingGroupId, String instanceId);

    /**
     * 查询伸缩活动
     * 
     * @see https://help.aliyun.com/document_detail/25961.html?spm=a2c4g.11186623.6.619.NL31Nn
     * @param regionId
     * @param scalingGroupId
     */
    DescribeScalingActivitiesResponse describeScalingActivities(String regionId, String scalingGroupId);

    /**
     * 执行弹性规则
     * 
     * @see https://help.aliyun.com/document_detail/25953.html?spm=a2c4g.11186623.6.630.AQ8a5v
     */
    ExecuteScalingRuleResponse executeScalingRule(String scalingRuleAri, String clientToken);
}